package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.common.annotation.DataSource;
import com.ruoyi.common.enums.DataSourceType;

import com.ruoyi.system.mapper.api.WTransferCollectMapper;
import com.ruoyi.system.domain.api.WTransferCollect;
import com.ruoyi.system.service.IWTransferCollectService;

/**
 * 归集记录Service业务层处理
 * 
 * @author ruoyi
 * @date 2022-04-22
 */
@DataSource(DataSourceType.SLAVE)
@Service
public class WTransferCollectServiceImpl implements IWTransferCollectService 
{
    @Autowired
    private WTransferCollectMapper wTransferCollectMapper;

    /**
     * 查询归集记录
     * 
     * @param id 归集记录主键
     * @return 归集记录
     */
    @Override
    public WTransferCollect selectWTransferCollectById(Long id)
    {
        return wTransferCollectMapper.selectWTransferCollectById(id);
    }

    /**
     * 查询归集记录列表
     * 
     * @param wTransferCollect 归集记录
     * @return 归集记录
     */
    @Override
    public List<WTransferCollect> selectWTransferCollectList(WTransferCollect wTransferCollect)
    {
        return wTransferCollectMapper.selectWTransferCollectList(wTransferCollect);
    }

    /**
     * 新增归集记录
     * 
     * @param wTransferCollect 归集记录
     * @return 结果
     */
    @Override
    public int insertWTransferCollect(WTransferCollect wTransferCollect)
    {
        wTransferCollect.setCreateTime(DateUtils.getNowDate());
        return wTransferCollectMapper.insertWTransferCollect(wTransferCollect);
    }

    /**
     * 修改归集记录
     * 
     * @param wTransferCollect 归集记录
     * @return 结果
     */
    @Override
    public int updateWTransferCollect(WTransferCollect wTransferCollect)
    {
        return wTransferCollectMapper.updateWTransferCollect(wTransferCollect);
    }

    /**
     * 批量删除归集记录
     * 
     * @param ids 需要删除的归集记录主键
     * @return 结果
     */
    @Override
    public int deleteWTransferCollectByIds(Long[] ids)
    {
        return wTransferCollectMapper.deleteWTransferCollectByIds(ids);
    }

    /**
     * 删除归集记录信息
     * 
     * @param id 归集记录主键
     * @return 结果
     */
    @Override
    public int deleteWTransferCollectById(Long id)
    {
        return wTransferCollectMapper.deleteWTransferCollectById(id);
    }
}
